import SlotEvents from "./SlotEvents";
import {App} from "@vue/runtime-core";

const components = [
  SlotEvents
];

const INSTALLED_KEY = Symbol('INSTALLED_KEY');

declare module '@vue/runtime-core' {
  export interface App {
    [key: symbol | string | number]: any;
  }
}
const install = (app: App) => {
  if (app[INSTALLED_KEY]) return;
  app[INSTALLED_KEY] = true;
  components.forEach(component => {
    app.component(component.name, component);
  });
};

export {
  SlotEvents
};
export default {
  install
};
